package com.chebaohui.iqs.service.impl.deal.libao;

import java.util.Date;

import com.chebaohui.iqs.entity.base.Company;
import com.chebaohui.iqs.entity.db.DbParam;
import com.chebaohui.iqs.entity.req.CarPrice;
import com.chebaohui.iqs.service.impl.deal.PriceThread;
import com.chebaohui.iqs.service.impl.deal.libao.profess.LbCarPrice;

/**
 * 利宝车险算费线程
 * 
 * @author xielonghai
 *
 */
public class LiBaoPriceThread extends PriceThread {

	private DbParam dbParam = null;// 数据记录

	public LiBaoPriceThread(CarPrice param, Company company) {
		super(param, company);
	}

	/**
	 * 线程启动
	 */
	@Override
	public void run() {
		begin = new Date().getTime();
		LbCarPrice lb = new LbCarPrice(param, company.getModelCode());
		result = lb.price();
		try {
			dbParam = lb.getMap();
		} catch (Exception e) {
			e.printStackTrace();
		}
		dealTime = new Date().getTime() - begin;
	}

	/**
	 * 获取数据记录实体类
	 * 
	 * @return
	 */
	public DbParam getDbParam() {
		return dbParam;
	}
}
